3.303 \(\int \sec (c+d x) (a+b \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx\)

Optimal. Leaf size=250 \[ \frac {\left (12 a^2 B+35 a A b+16 b^2 B\right ) \tan (c+d x) (a+b \sec (c+d x))^2}{60 d}+\frac {b \left (24 a^3 B+130 a^2 A b+116 a b^2 B+45 A b^3\right ) \tan (c+d x) \sec (c+d x)}{120 d}+\frac {\left (12 a^4 B+95 a^3 A b+112 a^2 b^2 B+80 a A b^3+16 b^4 B\right ) \tan (c+d x)}{30 d}+\frac {\left (8 a^4 A+16 a^3 b B+24 a^2 A b^2+12 a b^3 B+3 A b^4\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {(4 a B+5 A b) \tan (c+d x) (a+b \sec (c+d x))^3}{20 d}+\frac {B \tan (c+d x) (a+b \sec (c+d x))^4}{5 d} \]

[Out]

1/8*(8*A*a^4+24*A*a^2*b^2+3*A*b^4+16*B*a^3*b+12*B*a*b^3)*arctanh(sin(d*x+c))/d+1/30*(95*A*a^3*b+80*A*a*b^3+12*
B*a^4+112*B*a^2*b^2+16*B*b^4)*tan(d*x+c)/d+1/120*b*(130*A*a^2*b+45*A*b^3+24*B*a^3+116*B*a*b^2)*sec(d*x+c)*tan(
d*x+c)/d+1/60*(35*A*a*b+12*B*a^2+16*B*b^2)*(a+b*sec(d*x+c))^2*tan(d*x+c)/d+1/20*(5*A*b+4*B*a)*(a+b*sec(d*x+c))
^3*tan(d*x+c)/d+1/5*B*(a+b*sec(d*x+c))^4*tan(d*x+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.52, antiderivative size = 250, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {4002, 3997, 3787, 3770, 3767, 8} \[ \frac {\left (95 a^3 A b+112 a^2 b^2 B+12 a^4 B+80 a A b^3+16 b^4 B\right ) \tan (c+d x)}{30 d}+\frac {\left (24 a^2 A b^2+8 a^4 A+16 a^3 b B+12 a b^3 B+3 A b^4\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {\left (12 a^2 B+35 a A b+16 b^2 B\right ) \tan (c+d x) (a+b \sec (c+d x))^2}{60 d}+\frac {b \left (130 a^2 A b+24 a^3 B+116 a b^2 B+45 A b^3\right ) \tan (c+d x) \sec (c+d x)}{120 d}+\frac {(4 a B+5 A b) \tan (c+d x) (a+b \sec (c+d x))^3}{20 d}+\frac {B \tan (c+d x) (a+b \sec (c+d x))^4}{5 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]*(a + b*Sec[c + d*x])^4*(A + B*Sec[c + d*x]),x]

[Out]

((8*a^4*A + 24*a^2*A*b^2 + 3*A*b^4 + 16*a^3*b*B + 12*a*b^3*B)*ArcTanh[Sin[c + d*x]])/(8*d) + ((95*a^3*A*b + 80
*a*A*b^3 + 12*a^4*B + 112*a^2*b^2*B + 16*b^4*B)*Tan[c + d*x])/(30*d) + (b*(130*a^2*A*b + 45*A*b^3 + 24*a^3*B +
 116*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(120*d) + ((35*a*A*b + 12*a^2*B + 16*b^2*B)*(a + b*Sec[c + d*x])^2*Ta
n[c + d*x])/(60*d) + ((5*A*b + 4*a*B)*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(20*d) + (B*(a + b*Sec[c + d*x])^4*
Tan[c + d*x])/(5*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3787

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3997

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.
) + (A_)), x_Symbol] :> -Simp[(b*B*Cot[e + f*x]*(d*Csc[e + f*x])^n)/(f*(n + 1)), x] + Dist[1/(n + 1), Int[(d*C
sc[e + f*x])^n*Simp[A*a*(n + 1) + B*b*n + (A*b + B*a)*(n + 1)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f
, A, B}, x] && NeQ[A*b - a*B, 0] &&  !LeQ[n, -1]

Rule 4002

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_))
, x_Symbol] :> -Simp[(B*Cot[e + f*x]*(a + b*Csc[e + f*x])^m)/(f*(m + 1)), x] + Dist[1/(m + 1), Int[Csc[e + f*x
]*(a + b*Csc[e + f*x])^(m - 1)*Simp[b*B*m + a*A*(m + 1) + (a*B*m + A*b*(m + 1))*Csc[e + f*x], x], x], x] /; Fr
eeQ[{a, b, A, B, e, f}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0]

Rubi steps

\begin {align*} \int \sec (c+d x) (a+b \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx &=\frac {B (a+b \sec (c+d x))^4 \tan (c+d x)}{5 d}+\frac {1}{5} \int \sec (c+d x) (a+b \sec (c+d x))^3 (5 a A+4 b B+(5 A b+4 a B) \sec (c+d x)) \, dx\\ &=\frac {(5 A b+4 a B) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 d}+\frac {B (a+b \sec (c+d x))^4 \tan (c+d x)}{5 d}+\frac {1}{20} \int \sec (c+d x) (a+b \sec (c+d x))^2 \left (20 a^2 A+15 A b^2+28 a b B+\left (35 a A b+12 a^2 B+16 b^2 B\right ) \sec (c+d x)\right ) \, dx\\ &=\frac {\left (35 a A b+12 a^2 B+16 b^2 B\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 d}+\frac {(5 A b+4 a B) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 d}+\frac {B (a+b \sec (c+d x))^4 \tan (c+d x)}{5 d}+\frac {1}{60} \int \sec (c+d x) (a+b \sec (c+d x)) \left (60 a^3 A+115 a A b^2+108 a^2 b B+32 b^3 B+\left (130 a^2 A b+45 A b^3+24 a^3 B+116 a b^2 B\right ) \sec (c+d x)\right ) \, dx\\ &=\frac {b \left (130 a^2 A b+45 A b^3+24 a^3 B+116 a b^2 B\right ) \sec (c+d x) \tan (c+d x)}{120 d}+\frac {\left (35 a A b+12 a^2 B+16 b^2 B\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 d}+\frac {(5 A b+4 a B) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 d}+\frac {B (a+b \sec (c+d x))^4 \tan (c+d x)}{5 d}+\frac {1}{120} \int \sec (c+d x) \left (15 \left (8 a^4 A+24 a^2 A b^2+3 A b^4+16 a^3 b B+12 a b^3 B\right )+4 \left (95 a^3 A b+80 a A b^3+12 a^4 B+112 a^2 b^2 B+16 b^4 B\right ) \sec (c+d x)\right ) \, dx\\ &=\frac {b \left (130 a^2 A b+45 A b^3+24 a^3 B+116 a b^2 B\right ) \sec (c+d x) \tan (c+d x)}{120 d}+\frac {\left (35 a A b+12 a^2 B+16 b^2 B\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 d}+\frac {(5 A b+4 a B) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 d}+\frac {B (a+b \sec (c+d x))^4 \tan (c+d x)}{5 d}+\frac {1}{8} \left (8 a^4 A+24 a^2 A b^2+3 A b^4+16 a^3 b B+12 a b^3 B\right ) \int \sec (c+d x) \, dx+\frac {1}{30} \left (95 a^3 A b+80 a A b^3+12 a^4 B+112 a^2 b^2 B+16 b^4 B\right ) \int \sec ^2(c+d x) \, dx\\ &=\frac {\left (8 a^4 A+24 a^2 A b^2+3 A b^4+16 a^3 b B+12 a b^3 B\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b \left (130 a^2 A b+45 A b^3+24 a^3 B+116 a b^2 B\right ) \sec (c+d x) \tan (c+d x)}{120 d}+\frac {\left (35 a A b+12 a^2 B+16 b^2 B\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 d}+\frac {(5 A b+4 a B) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 d}+\frac {B (a+b \sec (c+d x))^4 \tan (c+d x)}{5 d}-\frac {\left (95 a^3 A b+80 a A b^3+12 a^4 B+112 a^2 b^2 B+16 b^4 B\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{30 d}\\ &=\frac {\left (8 a^4 A+24 a^2 A b^2+3 A b^4+16 a^3 b B+12 a b^3 B\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {\left (95 a^3 A b+80 a A b^3+12 a^4 B+112 a^2 b^2 B+16 b^4 B\right ) \tan (c+d x)}{30 d}+\frac {b \left (130 a^2 A b+45 A b^3+24 a^3 B+116 a b^2 B\right ) \sec (c+d x) \tan (c+d x)}{120 d}+\frac {\left (35 a A b+12 a^2 B+16 b^2 B\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 d}+\frac {(5 A b+4 a B) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 d}+\frac {B (a+b \sec (c+d x))^4 \tan (c+d x)}{5 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 3.94, size = 198, normalized size = 0.79 \[ \frac {15 \left (8 a^4 A+16 a^3 b B+24 a^2 A b^2+12 a b^3 B+3 A b^4\right ) \tanh ^{-1}(\sin (c+d x))+\tan (c+d x) \left (80 b^2 \left (3 a^2 B+2 a A b+b^2 B\right ) \tan ^2(c+d x)+15 b \left (16 a^3 B+24 a^2 A b+12 a b^2 B+3 A b^3\right ) \sec (c+d x)+120 \left (a^4 B+4 a^3 A b+6 a^2 b^2 B+4 a A b^3+b^4 B\right )+30 b^3 (4 a B+A b) \sec ^3(c+d x)+24 b^4 B \tan ^4(c+d x)\right )}{120 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]*(a + b*Sec[c + d*x])^4*(A + B*Sec[c + d*x]),x]

[Out]

(15*(8*a^4*A + 24*a^2*A*b^2 + 3*A*b^4 + 16*a^3*b*B + 12*a*b^3*B)*ArcTanh[Sin[c + d*x]] + Tan[c + d*x]*(120*(4*
a^3*A*b + 4*a*A*b^3 + a^4*B + 6*a^2*b^2*B + b^4*B) + 15*b*(24*a^2*A*b + 3*A*b^3 + 16*a^3*B + 12*a*b^2*B)*Sec[c
 + d*x] + 30*b^3*(A*b + 4*a*B)*Sec[c + d*x]^3 + 80*b^2*(2*a*A*b + 3*a^2*B + b^2*B)*Tan[c + d*x]^2 + 24*b^4*B*T
an[c + d*x]^4))/(120*d)

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 281, normalized size = 1.12 \[ \frac {15 \, {\left (8 \, A a^{4} + 16 \, B a^{3} b + 24 \, A a^{2} b^{2} + 12 \, B a b^{3} + 3 \, A b^{4}\right )} \cos \left (d x + c\right )^{5} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (8 \, A a^{4} + 16 \, B a^{3} b + 24 \, A a^{2} b^{2} + 12 \, B a b^{3} + 3 \, A b^{4}\right )} \cos \left (d x + c\right )^{5} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (24 \, B b^{4} + 8 \, {\left (15 \, B a^{4} + 60 \, A a^{3} b + 60 \, B a^{2} b^{2} + 40 \, A a b^{3} + 8 \, B b^{4}\right )} \cos \left (d x + c\right )^{4} + 15 \, {\left (16 \, B a^{3} b + 24 \, A a^{2} b^{2} + 12 \, B a b^{3} + 3 \, A b^{4}\right )} \cos \left (d x + c\right )^{3} + 16 \, {\left (15 \, B a^{2} b^{2} + 10 \, A a b^{3} + 2 \, B b^{4}\right )} \cos \left (d x + c\right )^{2} + 30 \, {\left (4 \, B a b^{3} + A b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sec(d*x+c))^4*(A+B*sec(d*x+c)),x, algorithm="fricas")

[Out]

1/240*(15*(8*A*a^4 + 16*B*a^3*b + 24*A*a^2*b^2 + 12*B*a*b^3 + 3*A*b^4)*cos(d*x + c)^5*log(sin(d*x + c) + 1) -
15*(8*A*a^4 + 16*B*a^3*b + 24*A*a^2*b^2 + 12*B*a*b^3 + 3*A*b^4)*cos(d*x + c)^5*log(-sin(d*x + c) + 1) + 2*(24*
B*b^4 + 8*(15*B*a^4 + 60*A*a^3*b + 60*B*a^2*b^2 + 40*A*a*b^3 + 8*B*b^4)*cos(d*x + c)^4 + 15*(16*B*a^3*b + 24*A
*a^2*b^2 + 12*B*a*b^3 + 3*A*b^4)*cos(d*x + c)^3 + 16*(15*B*a^2*b^2 + 10*A*a*b^3 + 2*B*b^4)*cos(d*x + c)^2 + 30
*(4*B*a*b^3 + A*b^4)*cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^5)

________________________________________________________________________________________

giac [B]  time = 1.08, size = 850, normalized size = 3.40 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sec(d*x+c))^4*(A+B*sec(d*x+c)),x, algorithm="giac")

[Out]

1/120*(15*(8*A*a^4 + 16*B*a^3*b + 24*A*a^2*b^2 + 12*B*a*b^3 + 3*A*b^4)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 15
*(8*A*a^4 + 16*B*a^3*b + 24*A*a^2*b^2 + 12*B*a*b^3 + 3*A*b^4)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(120*B*a^
4*tan(1/2*d*x + 1/2*c)^9 + 480*A*a^3*b*tan(1/2*d*x + 1/2*c)^9 - 240*B*a^3*b*tan(1/2*d*x + 1/2*c)^9 - 360*A*a^2
*b^2*tan(1/2*d*x + 1/2*c)^9 + 720*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^9 + 480*A*a*b^3*tan(1/2*d*x + 1/2*c)^9 - 300*
B*a*b^3*tan(1/2*d*x + 1/2*c)^9 - 75*A*b^4*tan(1/2*d*x + 1/2*c)^9 + 120*B*b^4*tan(1/2*d*x + 1/2*c)^9 - 480*B*a^
4*tan(1/2*d*x + 1/2*c)^7 - 1920*A*a^3*b*tan(1/2*d*x + 1/2*c)^7 + 480*B*a^3*b*tan(1/2*d*x + 1/2*c)^7 + 720*A*a^
2*b^2*tan(1/2*d*x + 1/2*c)^7 - 1920*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^7 - 1280*A*a*b^3*tan(1/2*d*x + 1/2*c)^7 + 1
20*B*a*b^3*tan(1/2*d*x + 1/2*c)^7 + 30*A*b^4*tan(1/2*d*x + 1/2*c)^7 - 160*B*b^4*tan(1/2*d*x + 1/2*c)^7 + 720*B
*a^4*tan(1/2*d*x + 1/2*c)^5 + 2880*A*a^3*b*tan(1/2*d*x + 1/2*c)^5 + 2400*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^5 + 16
00*A*a*b^3*tan(1/2*d*x + 1/2*c)^5 + 464*B*b^4*tan(1/2*d*x + 1/2*c)^5 - 480*B*a^4*tan(1/2*d*x + 1/2*c)^3 - 1920
*A*a^3*b*tan(1/2*d*x + 1/2*c)^3 - 480*B*a^3*b*tan(1/2*d*x + 1/2*c)^3 - 720*A*a^2*b^2*tan(1/2*d*x + 1/2*c)^3 -
1920*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^3 - 1280*A*a*b^3*tan(1/2*d*x + 1/2*c)^3 - 120*B*a*b^3*tan(1/2*d*x + 1/2*c)
^3 - 30*A*b^4*tan(1/2*d*x + 1/2*c)^3 - 160*B*b^4*tan(1/2*d*x + 1/2*c)^3 + 120*B*a^4*tan(1/2*d*x + 1/2*c) + 480
*A*a^3*b*tan(1/2*d*x + 1/2*c) + 240*B*a^3*b*tan(1/2*d*x + 1/2*c) + 360*A*a^2*b^2*tan(1/2*d*x + 1/2*c) + 720*B*
a^2*b^2*tan(1/2*d*x + 1/2*c) + 480*A*a*b^3*tan(1/2*d*x + 1/2*c) + 300*B*a*b^3*tan(1/2*d*x + 1/2*c) + 75*A*b^4*
tan(1/2*d*x + 1/2*c) + 120*B*b^4*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^5)/d

________________________________________________________________________________________

maple [A]  time = 1.67, size = 431, normalized size = 1.72 \[ \frac {A \,a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {a^{4} B \tan \left (d x +c \right )}{d}+\frac {4 A \,a^{3} b \tan \left (d x +c \right )}{d}+\frac {2 B \,a^{3} b \sec \left (d x +c \right ) \tan \left (d x +c \right )}{d}+\frac {2 B \,a^{3} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {3 A \,a^{2} b^{2} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{d}+\frac {3 A \,a^{2} b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {4 a^{2} b^{2} B \tan \left (d x +c \right )}{d}+\frac {2 a^{2} b^{2} B \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{d}+\frac {8 a A \,b^{3} \tan \left (d x +c \right )}{3 d}+\frac {4 a A \,b^{3} \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{3 d}+\frac {B a \,b^{3} \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{d}+\frac {3 B a \,b^{3} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {3 B a \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {A \,b^{4} \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{4 d}+\frac {3 A \,b^{4} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{8 d}+\frac {3 A \,b^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d}+\frac {8 B \,b^{4} \tan \left (d x +c \right )}{15 d}+\frac {B \,b^{4} \tan \left (d x +c \right ) \left (\sec ^{4}\left (d x +c \right )\right )}{5 d}+\frac {4 B \,b^{4} \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{15 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)*(a+b*sec(d*x+c))^4*(A+B*sec(d*x+c)),x)

[Out]

1/d*A*a^4*ln(sec(d*x+c)+tan(d*x+c))+1/d*a^4*B*tan(d*x+c)+4/d*A*a^3*b*tan(d*x+c)+2/d*B*a^3*b*sec(d*x+c)*tan(d*x
+c)+2/d*B*a^3*b*ln(sec(d*x+c)+tan(d*x+c))+3/d*A*a^2*b^2*sec(d*x+c)*tan(d*x+c)+3/d*A*a^2*b^2*ln(sec(d*x+c)+tan(
d*x+c))+4/d*a^2*b^2*B*tan(d*x+c)+2/d*a^2*b^2*B*tan(d*x+c)*sec(d*x+c)^2+8/3/d*a*A*b^3*tan(d*x+c)+4/3/d*a*A*b^3*
tan(d*x+c)*sec(d*x+c)^2+1/d*B*a*b^3*tan(d*x+c)*sec(d*x+c)^3+3/2/d*B*a*b^3*sec(d*x+c)*tan(d*x+c)+3/2/d*B*a*b^3*
ln(sec(d*x+c)+tan(d*x+c))+1/4/d*A*b^4*tan(d*x+c)*sec(d*x+c)^3+3/8/d*A*b^4*sec(d*x+c)*tan(d*x+c)+3/8/d*A*b^4*ln
(sec(d*x+c)+tan(d*x+c))+8/15/d*B*b^4*tan(d*x+c)+1/5/d*B*b^4*tan(d*x+c)*sec(d*x+c)^4+4/15/d*B*b^4*tan(d*x+c)*se
c(d*x+c)^2

________________________________________________________________________________________

maxima [A]  time = 1.02, size = 379, normalized size = 1.52 \[ \frac {480 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a^{2} b^{2} + 320 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a b^{3} + 16 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} B b^{4} - 60 \, B a b^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 15 \, A b^{4} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 240 \, B a^{3} b {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 360 \, A a^{2} b^{2} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 240 \, A a^{4} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 240 \, B a^{4} \tan \left (d x + c\right ) + 960 \, A a^{3} b \tan \left (d x + c\right )}{240 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sec(d*x+c))^4*(A+B*sec(d*x+c)),x, algorithm="maxima")

[Out]

1/240*(480*(tan(d*x + c)^3 + 3*tan(d*x + c))*B*a^2*b^2 + 320*(tan(d*x + c)^3 + 3*tan(d*x + c))*A*a*b^3 + 16*(3
*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*B*b^4 - 60*B*a*b^3*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c
))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 15*A*b^4*(2*
(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(
sin(d*x + c) - 1)) - 240*B*a^3*b*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x +
c) - 1)) - 360*A*a^2*b^2*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1))
 + 240*A*a^4*log(sec(d*x + c) + tan(d*x + c)) + 240*B*a^4*tan(d*x + c) + 960*A*a^3*b*tan(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 6.01, size = 555, normalized size = 2.22 \[ \frac {\mathrm {atanh}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A\,a^4+2\,B\,a^3\,b+3\,A\,a^2\,b^2+\frac {3\,B\,a\,b^3}{2}+\frac {3\,A\,b^4}{8}\right )}{4\,A\,a^4+8\,B\,a^3\,b+12\,A\,a^2\,b^2+6\,B\,a\,b^3+\frac {3\,A\,b^4}{2}}\right )\,\left (2\,A\,a^4+4\,B\,a^3\,b+6\,A\,a^2\,b^2+3\,B\,a\,b^3+\frac {3\,A\,b^4}{4}\right )}{d}-\frac {\left (2\,B\,a^4-\frac {5\,A\,b^4}{4}+2\,B\,b^4-6\,A\,a^2\,b^2+12\,B\,a^2\,b^2+8\,A\,a\,b^3+8\,A\,a^3\,b-5\,B\,a\,b^3-4\,B\,a^3\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (\frac {A\,b^4}{2}-8\,B\,a^4-\frac {8\,B\,b^4}{3}+12\,A\,a^2\,b^2-32\,B\,a^2\,b^2-\frac {64\,A\,a\,b^3}{3}-32\,A\,a^3\,b+2\,B\,a\,b^3+8\,B\,a^3\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (12\,B\,a^4+48\,A\,a^3\,b+40\,B\,a^2\,b^2+\frac {80\,A\,a\,b^3}{3}+\frac {116\,B\,b^4}{15}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {A\,b^4}{2}-8\,B\,a^4-\frac {8\,B\,b^4}{3}-12\,A\,a^2\,b^2-32\,B\,a^2\,b^2-\frac {64\,A\,a\,b^3}{3}-32\,A\,a^3\,b-2\,B\,a\,b^3-8\,B\,a^3\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {5\,A\,b^4}{4}+2\,B\,a^4+2\,B\,b^4+6\,A\,a^2\,b^2+12\,B\,a^2\,b^2+8\,A\,a\,b^3+8\,A\,a^3\,b+5\,B\,a\,b^3+4\,B\,a^3\,b\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B/cos(c + d*x))*(a + b/cos(c + d*x))^4)/cos(c + d*x),x)

[Out]

(atanh((4*tan(c/2 + (d*x)/2)*(A*a^4 + (3*A*b^4)/8 + 3*A*a^2*b^2 + (3*B*a*b^3)/2 + 2*B*a^3*b))/(4*A*a^4 + (3*A*
b^4)/2 + 12*A*a^2*b^2 + 6*B*a*b^3 + 8*B*a^3*b))*(2*A*a^4 + (3*A*b^4)/4 + 6*A*a^2*b^2 + 3*B*a*b^3 + 4*B*a^3*b))
/d - (tan(c/2 + (d*x)/2)*((5*A*b^4)/4 + 2*B*a^4 + 2*B*b^4 + 6*A*a^2*b^2 + 12*B*a^2*b^2 + 8*A*a*b^3 + 8*A*a^3*b
 + 5*B*a*b^3 + 4*B*a^3*b) + tan(c/2 + (d*x)/2)^5*(12*B*a^4 + (116*B*b^4)/15 + 40*B*a^2*b^2 + (80*A*a*b^3)/3 +
48*A*a^3*b) + tan(c/2 + (d*x)/2)^9*(2*B*a^4 - (5*A*b^4)/4 + 2*B*b^4 - 6*A*a^2*b^2 + 12*B*a^2*b^2 + 8*A*a*b^3 +
 8*A*a^3*b - 5*B*a*b^3 - 4*B*a^3*b) - tan(c/2 + (d*x)/2)^3*((A*b^4)/2 + 8*B*a^4 + (8*B*b^4)/3 + 12*A*a^2*b^2 +
 32*B*a^2*b^2 + (64*A*a*b^3)/3 + 32*A*a^3*b + 2*B*a*b^3 + 8*B*a^3*b) - tan(c/2 + (d*x)/2)^7*(8*B*a^4 - (A*b^4)
/2 + (8*B*b^4)/3 - 12*A*a^2*b^2 + 32*B*a^2*b^2 + (64*A*a*b^3)/3 + 32*A*a^3*b - 2*B*a*b^3 - 8*B*a^3*b))/(d*(5*t
an(c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2)^6 - 5*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (
d*x)/2)^10 - 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (A + B \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{4} \sec {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sec(d*x+c))**4*(A+B*sec(d*x+c)),x)

[Out]

Integral((A + B*sec(c + d*x))*(a + b*sec(c + d*x))**4*sec(c + d*x), x)

________________________________________________________________________________________